package cn.edu.scau.cmi.chenjia.adapter;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class classAdapter extends SortUtil implements Target{
	@Override
	public ArrayList<Student> sortStudent(ArrayList<Student> studentList){
		for(int i=0;i<studentList.size()-1;i++) {
			for(int j=0;j<studentList.size()-i-1;j++) {
				if(studentList.get(j).name.compareTo(studentList.get(j+1).name)>0) {
					Student st=studentList.get(j);
					studentList.set(j, studentList.get(j+1));
					studentList.set(j+1, st);
				}	
			}
		}
		return studentList;
	}
}
